﻿using Bootstrap.Helper;
using Bootstrap.Template.InnerItems;
namespace Bootstrap.Control
{
    public class BootstrapItem : AbstractBootstrapItem, IInnerItem
    {
        public string Text { get; set; }
        public string Value { get; set; }
        public string BadgedValue { get; set; }
        public bool IsActive { get; set; }
        public string Href { get; set; }

        public string GetTemplate()
        {
            BootstrapItemTemplate template = new BootstrapItemTemplate();

            template.IsActive = ValueHelper.GetDefaultValue<bool>(this.IsActive, false);
            template.Value = ValueHelper.GetDefaultValue<string>(this.Value, string.Empty);
            template.BadgedValue = ValueHelper.GetDefaultValue<string>(this.BadgedValue, string.Empty);
            template.Text = ValueHelper.GetDefaultValue<string>(this.Text, string.Empty);
            template.Href = ValueHelper.GetDefaultValue<string>(this.Href, "#");

            return template.TransformText();
        }
    }
}
